package com.ys.web.user.collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class CollectionService {
    @Autowired
    private CollectionMapper collectionMapper;

    public void saveCollection(Collection collection){
        collectionMapper.saveCollection(collection);
    }

    public long getCollectionListPageCount(Map<String,Object> map){
        return collectionMapper.getCollectionListPageCount(map);
    }

    public List<Collection> getCollectionListPage(Map<String,Object> map){
        return collectionMapper.getCollectionListPage(map);
    }

    public void deleteById(Collection collection) {
        collectionMapper.deleteById(collection);
    }
}
